@echo off
set binDir=%~dp0

rd /S/Q %binDir%\pb
mkdir %binDir%\pb

cd %binDir%\proto
for %%i in (*.proto) do (
     %binDir%\bin\protoc %%i --proto_path=. --descriptor_set_out=%binDir%\pb\%%i
)

ren "%binDir%\pb\*.proto" *.pb

cd ../

pause